﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using EbbinghausWord.BLL;
using EbbinghausWord.Common;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;

namespace EbbinghausWord.Pages
{
    public partial class About : PhoneApplicationPage
    {
        public About()
        {
            InitializeComponent();

            versionTextBlock.Text = SystemConfig.Version;
            appTitle.Text = SystemConfig.AppTitle;

            //是否显示广告
#if FREE
            adPanel.Visibility = Visibility.Visible;
#else
            adPanel.Visibility = SystemConfig.IsTrial ? Visibility.Visible : Visibility.Collapsed;
#endif
        }

        private void feedbackApplicationBarIconButton_Click(object sender, EventArgs e)
        {
            FeedbackManager.OpenFeedbackMail();
        }

        private void rankApplicationBarIconButton_Click(object sender, EventArgs e)
        {
            FeedbackManager.OpenRank();
        }
    }
}